<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增设备管理')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-equipment-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">设备编号：</label>
                <div class="col-sm-8">
                    <input name="equipmentNum" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">设备名字：</label>
                <div class="col-sm-8">
                    <input name="equipmentName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">设备类型：</label>
                <div class="col-sm-8">
                    <select name="equipmentType" onchange="" required class="form-control m-b" th:with="type=${@dict.getType('equipment_type')}">
                        <option value="">所有</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">进出场：</label>
                <div class="col-sm-8">
                    <select name="equipmentDirectionType" required class="form-control m-b" th:with="type=${@dict.getType('equipment_in')}">
                        <option value="">所有</option>
                        <option  th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group" id="" >
                <label class="col-sm-3 control-label is-required">设备位置：</label>
                <div class="col-sm-8">
                    <select name="equipmentPositione" required class="form-control m-b" th:with="type=${@dict.getType('equipment_weizhi')}">
                        <option value="">所有</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">楼栋：</label>
                <div class="col-sm-8">
                    <input name="floor" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">单元：</label>
                <div class="col-sm-8">
                    <input name="unit" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">房屋：</label>
                <div class="col-sm-8">
                    <input name="room" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">大门：</label>
                <div class="col-sm-8">
                    <input name="door" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">ip：</label>
                <div class="col-sm-8">
                    <input name="ip" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">访问路径：</label>
                <div class="col-sm-8">
                    <input name="url" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "equipment/equipment"
        $("#form-equipment-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-equipment-add').serialize());
            }
        }
    </script>
</body>
</html>